<template>
  <div class="title">首页{{ id }}</div>

  <router-link :to="{ name: '403', query: { redirect: '/p2/c21?id=c21' } }">
    403
  </router-link>
</template>

<script>
  export default {
    name: 'home', // 首页
    props: {},
    components: {},
    data() {
      return {
        id: '',
      }
    },
    // 页面渲染前
    created() {
      this.id = this.$route.query.id
    },
    // 监听事件
    watch: {
      $route() {
        this.id = this.$route.query.id
      },
    },
    // 页面渲染后
    mounted() {},
    // 方法
    methods: {},
  }
</script>

<style lang="less" scoped>
  .title {
    color: var(--theme-color);
  }
</style>
